<?php
/**
 * Created by PhpStorm.
 * User: wanghaibo
 * Date: 17/12/5
 * Time: 17:54
 */

namespace App\Http\Controllers\Admin\Coopen\Service;

use App\Http\Controllers\Admin\Coopen\Repository\Coopen as CoopenRepository;
use Illuminate\Http\Request;

class Coopen
{
    private $repository;
    public function __construct ()
    {
        $this->repository = new CoopenRepository();
    }
    public function get(){
        $info = $this->repository->with(['video'])->first();
        return $info;
    }
    public function update($post){
        $model = $this->repository->first();
        $model->video_id = $post['video_id'];
        $model->save();
    }
}